# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=greetd-wlgreet
_projname=wlgreet
pkgver=0.4.1
pkgrel=0
pkgdesc="Raw wayland greeter for greetd"
url="https://git.sr.ht/~kennylevinsen/wlgreet"
# riscv64, s390x: blocked by greetd
arch="all !riscv64 !s390x"
license="GPL-3.0-only"
depends="
	greetd
	wayland-libs-client
	"
makedepends="
	cargo
	cargo-auditable
	wayland-dev
	"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~kennylevinsen/wlgreet/archive/$pkgver.tar.gz"
builddir="$srcdir/$_projname-$pkgver"
options="!check"  # no tests provided

export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

package() {
	install -D -m755 target/release/wlgreet -t "$pkgdir"/usr/bin/
}

sha512sums="
f5259992a43af751e91a328433594cc4c97805ad5a7c2bd81a0b455128994b8f925fe9e314759f08ce409a186c1e8942a77a60becbca5d974da647c8a045dcfb  greetd-wlgreet-0.4.1.tar.gz
"
